Skip to content

feat(server-utils): Implement orchestrion-based instrumentation for vercel-ai v6#21658

Open
mydea wants to merge 4 commits into
developfrom
fn/try-orchestrion
Open

feat(server-utils): Implement orchestrion-based instrumentation for vercel-ai v6#21658
mydea wants to merge 4 commits into
developfrom
fn/try-orchestrion

Conversation

@mydea

@mydea mydea commented Jun 19, 2026

Copy link
Copy Markdown
Member

When using orchestrion, this replaces the regular vercelAiIntegration with the channel-variant. This today supports vercel ai v6 and v7 (v5/v4 support TBD).

Test coverage exists and everything passes. This does not add any event processors etc. anymore, everything works inside of the integrations.

OTEL Spans emitted directly by vercel-ai v6 or below are ignored to avoid double instrumentation.

@mydea mydea self-assigned this Jun 19, 2026
Comment thread packages/server-utils/src/vercel-ai/vercel-ai-orchestrion-v6-subscriber.ts Outdated
Comment thread packages/server-utils/src/vercel-ai/vercel-ai-orchestrion-v6-subscriber.ts Outdated
Comment thread dev-packages/node-integration-tests/suites/tracing/vercelai/v6_v7/test.ts Outdated
@mydea mydea force-pushed the fn/vercel-ai-v7 branch 9 times, most recently from 9145703 to abad3a9 Compare June 25, 2026 11:33
Base automatically changed from fn/vercel-ai-v7 to develop June 25, 2026 13:20
@mydea mydea force-pushed the fn/try-orchestrion branch from 3417464 to d05d40e Compare June 26, 2026 11:13
Comment thread packages/opentelemetry/src/asyncContextStrategy.ts Outdated
Comment thread packages/core/src/asyncContext/index.ts Outdated
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 27.48 kB - -
@sentry/browser - with treeshaking flags 25.91 kB - -
@sentry/browser (incl. Tracing) 46 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.76 kB - -
@sentry/browser (incl. Tracing, Profiling) 50.79 kB - -
@sentry/browser (incl. Tracing, Replay) 85.25 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 74.84 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 89.95 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 102.61 kB - -
@sentry/browser (incl. Feedback) 44.66 kB - -
@sentry/browser (incl. sendFeedback) 32.26 kB - -
@sentry/browser (incl. FeedbackAsync) 37.4 kB - -
@sentry/browser (incl. Metrics) 28.54 kB - -
@sentry/browser (incl. Logs) 28.78 kB - -
@sentry/browser (incl. Metrics & Logs) 29.47 kB - -
@sentry/react 29.27 kB - -
@sentry/react (incl. Tracing) 48.31 kB - -
@sentry/vue 32.66 kB - -
@sentry/vue (incl. Tracing) 47.87 kB - -
@sentry/svelte 27.5 kB - -
CDN Bundle 29.89 kB - -
CDN Bundle (incl. Tracing) 47.94 kB - -
CDN Bundle (incl. Logs, Metrics) 31.44 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.29 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.77 kB - -
CDN Bundle (incl. Tracing, Replay) 85.45 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.72 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.24 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.49 kB - -
CDN Bundle - uncompressed 88.95 kB - -
CDN Bundle (incl. Tracing) - uncompressed 145.16 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 93.65 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 149.14 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 218.63 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 264.18 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 268.14 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 277.88 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 281.83 kB - -
@sentry/nextjs (client) 50.7 kB - -
@sentry/sveltekit (client) 46.4 kB - -
@sentry/core/server 77.67 kB - -
@sentry/core/browser 63.97 kB - -
@sentry/node-core 61.41 kB - -
@sentry/node 122.67 kB +0.02% +15 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 69.95 kB - -
@sentry/node/light 50.39 kB +0.01% +1 B 🔺
@sentry/node - without tracing 73.13 kB +0.01% +1 B 🔺
@sentry/aws-serverless 84.02 kB +0.01% +1 B 🔺
@sentry/cloudflare (withSentry) - minified 180.46 kB - -
@sentry/cloudflare (withSentry) 446.48 kB - -

View base workflow run

@mydea mydea force-pushed the fn/try-orchestrion branch from d05d40e to 98fac43 Compare June 29, 2026 09:42
@mydea mydea changed the title WIP: Implement orchestrion-based instrumentation for vercel-ai v6 feat(server-utils): Implement orchestrion-based instrumentation for vercel-ai v6 Jun 29, 2026
@mydea mydea marked this pull request as ready for review June 29, 2026 09:42
@mydea mydea requested a review from a team as a code owner June 29, 2026 09:42
@mydea mydea requested review from JPeer264 and andreiborza and removed request for a team June 29, 2026 09:42
Comment thread packages/server-utils/src/vercel-ai/vercel-ai-orchestrion-v6-subscriber.ts Outdated

@JPeer264 JPeer264 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't found any major issues. Tests are failing though and clanker has some objections

Comment thread packages/server-utils/src/vercel-ai/vercel-ai-orchestrion-v6-subscriber.ts Outdated
Comment thread packages/server-utils/src/vercel-ai/vercel-ai-orchestrion-v6-subscriber.ts Outdated
return isRecord(model) ? asString(model[field]) : undefined;
}

function asString(value: unknown): string | undefined {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super-l: Maybe it makes sense to outsource these functions in a helper? vercel-ai-dc-subscriber.ts is also using some of the helpers

@mydea mydea force-pushed the fn/try-orchestrion branch from 05fd48d to 89bf321 Compare June 29, 2026 12:57
Comment thread packages/server-utils/src/vercel-ai/vercel-ai-orchestrion-v6-subscriber.ts Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 89bf321. Configure here.

Comment thread packages/server-utils/src/vercel-ai/vercel-ai-orchestrion-v6-subscriber.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants